{$CLEO .cs}
{$NOSOURCE}

0000:
if
8AE4:   directory_exists "CLEO\A9xParkour"
jf @next
0AE5: create_directory "CLEO\A9xParkour"
:next
if
0AF0: 0@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No1"  key  "Time"
jf @Nexus
if
8AAB:   file_exists "CLEO\A9xParkour\Parkour1"
jf @next1
:Nexus
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No1"  key  "Time"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No2"  key  "Time"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No3"  key  "Time"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No4"  key  "Time"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No5"  key  "Time"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No1"  key  "Last"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No2"  key  "Last"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No3"  key  "Last"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No4"  key  "Last"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No5"  key  "Last"
0AF1: write_int 1 to_ini_file "CLEO\A9xParkour\Parkour1" section "No1"  key  "Pass"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No2"  key  "Pass"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No3"  key  "Pass"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No4"  key  "Pass"
0AF1: write_int 0 to_ini_file "CLEO\A9xParkour\Parkour1" section "No5"  key  "Pass"
:next1
0ADF: add_dynamic_GXT_entry "A9xBTy" text "Best_Time:~1~ Last_Time:~1~"
0ADF: add_dynamic_GXT_entry "Choosx" text "~r~Choose the Parkour"
0ADF: add_dynamic_GXT_entry "9xPasb" text "Complete Before this Stage To unlock"
0ADF: add_dynamic_GXT_entry "Kour_1" text "~h~#1 Billboardman !"
0ADF: add_dynamic_GXT_entry "Kour_2" text "~h~#2 Roof Jumper"
0ADF: add_dynamic_GXT_entry "Kour_3" text "~h~#3 Sewer'our"
0ADF: add_dynamic_GXT_entry "Kour_4" text "~h~#4 Greet the Neightbour"
0ADF: add_dynamic_GXT_entry "Kour_5" text "~h~#5 To The Top"
:First
wait 0
if and
0ADC: "9XPK01"
86B9:   not cutscene_data_loaded                                                             
09E7:   player $PLAYER_CHAR not_frozen                                                       
jf @First
0ADF: add_dynamic_GXT_entry "A9xPar" text "A9xParkour_Challenge_1"
0ADF: add_dynamic_GXT_entry "A9xPKMN" text "Menu"
:BOX
08DA: remove_panel 2@ 
wait 200
01B4: set_player $PLAYER_CHAR can_move 0
08D4: 2@ = create_panel_with_title 'A9xPKMN' position 30.0 115.0 width 220.0 columns 1 interactive 1 background 1 alignment 0 
08DB: set_panel 2@ column 0 header 'Choosx' data 'Kour_1' 'Kour_2' 'Kour_3' 'Kour_4' 'Kour_5' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 

:BOX1      
081C: draw_text_outline 2 RGBA 255 255 255 255
0349: set_text_draw_font 3 
033F: set_text_draw_letter_size 0.6 1.81                                             
0340: set_text_draw_RGBA 250 1 1 255
033E: set_draw_text_position 35.0 50.0 GXT 'A9xPar'
03E6: remove_text_box
wait 0 
if 
00E1:   player 0 pressed_key 15 
jf @BOX2 
03F0: enable_text_draw 0
08DA: remove_panel 2@
01B4: set_player $PLAYER_CHAR can_move 1 
jump @First

:BOX3
00E1:   player 0 pressed_key 16 
jf @BOX1
01B4: set_player $PLAYER_CHAR can_move 1
03F0: enable_text_draw 0
08D7: 1@ = panel 2@ active_row 
08DA: remove_panel 2@
03E6: remove_text_box
if
$ONMISSION == 0
jf @First
0871: init_jump_table 1@ total_jumps 11 default_jump 0 @First jumps 0 @1 1 @2 2 @3 3 @4 4 @5 5 @Null 6 @Null
0872: jump_table_jumps 7 @Null 8 @Null 9 @Null 10 @Null -1 @Null -1 @Null -1 @Null -1 @Null -1 @Null 

:BOX2
08D7: 4@ = panel 2@ active_row 
if
4@ == 0
jf @Pro1
03F0: enable_text_draw 0
081C: draw_text_outline 1 RGBA 255 255 255 255
0349: set_text_draw_font 3 
033F: set_text_draw_letter_size 0.35 1.01                                             
0340: set_text_draw_RGBA 250 1 1 255   
0AF0: 3@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No1" key "Time"
0AF0: 5@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No1" key "Last"
045B: draw_text_2numbers 35.0 70.0 GXT 'A9xBTy' number 3@ 5@
jump @BOX3
:Pro1
if
4@ == 1
jf @Pro2
03F0: enable_text_draw 0
081C: draw_text_outline 1 RGBA 255 255 255 255
0349: set_text_draw_font 3 
033F: set_text_draw_letter_size 0.35 1.01                                             
0340: set_text_draw_RGBA 250 1 1 255   
0AF0: 3@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No2" key "Time"
0AF0: 5@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No2" key "Last"
045B: draw_text_2numbers 35.0 70.0 GXT 'A9xBTy' number 3@ 5@
jump @BOX3
:Pro2
if
4@ == 2
jf @Pro3
03F0: enable_text_draw 0
081C: draw_text_outline 1 RGBA 255 255 255 255
0349: set_text_draw_font 3 
033F: set_text_draw_letter_size 0.35 1.01                                             
0340: set_text_draw_RGBA 250 1 1 255   
0AF0: 3@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No3" key "Time"
0AF0: 5@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No3" key "Last"
045B: draw_text_2numbers 35.0 70.0 GXT 'A9xBTy' number 3@ 5@
jump @BOX3
:Pro3
if
4@ == 3
jf @Pro4
03F0: enable_text_draw 0
081C: draw_text_outline 1 RGBA 255 255 255 255
0349: set_text_draw_font 3 
033F: set_text_draw_letter_size 0.35 1.01                                             
0340: set_text_draw_RGBA 250 1 1 255   
0AF0: 3@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No4" key "Time"
0AF0: 5@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No4" key "Last"
045B: draw_text_2numbers 35.0 70.0 GXT 'A9xBTy' number 3@ 5@
jump @BOX3
:Pro4
03F0: enable_text_draw 0
081C: draw_text_outline 1 RGBA 255 255 255 255
0349: set_text_draw_font 3 
033F: set_text_draw_letter_size 0.35 1.01                                             
0340: set_text_draw_RGBA 250 1 1 255   
0AF0: 3@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No5" key "Time"
0AF0: 5@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No5" key "Last"
045B: draw_text_2numbers 35.0 70.0 GXT 'A9xBTy' number 3@ 5@
jump @BOX3

:Null
jump @First

:1
0A92: create_custom_thread "A9xParkour\Parkour1.cm"    
0A92: create_custom_thread "A9xParkour\PWeapon.cm"    
jump @First
0A93: end_custom_thread

:2
0AF0: 1@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No2" key "Pass"
if
1@ == 1
jf @Fail
0A92: create_custom_thread "A9xParkour\Parkour2.cm"    
0A92: create_custom_thread "A9xParkour\PWeapon.cm"    
jump @First
0A93: end_custom_thread

:3
0AF0: 1@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No3" key "Pass"
if
1@ == 1
jf @Fail
0A92: create_custom_thread "A9xParkour\Parkour3.cm"    
0A92: create_custom_thread "A9xParkour\PWeapon.cm"    
jump @First
0A93: end_custom_thread

:4
0AF0: 1@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No4" key "Pass"
if
1@ == 1
jf @Fail
0A92: create_custom_thread "A9xParkour\Parkour4.cm"    
0A92: create_custom_thread "A9xParkour\PWeapon.cm"    
jump @First
0A93: end_custom_thread

:5
0AF0: 1@ = get_int_from_ini_file "CLEO\A9xParkour\Parkour1" section "No5" key "Pass"
if
1@ == 1
jf @Fail
0A92: create_custom_thread "A9xParkour\Parkour5.cm"    
0A92: create_custom_thread "A9xParkour\PWeapon.cm"    
jump @First
0A93: end_custom_thread

:Fail
03E5: show_text_box '9xPasb'
jump @First
